<template>
    <cloudAnalysis :option="option" v-if="loading">

    </cloudAnalysis>
</template>

<script>
import { Loading } from 'element-ui';
import { deepClone } from '@/utils';
import { loadPageContentRequest } from '@/api/cloudAnalysis'
export default {
    name: 'GenescloudUiIndex',

    data() {
        return {
            option: {},
            queryParams: {},
            loading:false,
            queryParams: {
                analysisId: null,
                pageCode: null,
            },
        };
    },
    created() {
        this.queryParams.pageCode = this.$router.history.current.name
        this.init()
    },
    methods: {
        async init() {
            const res = await loadPageContentRequest(this.queryParams)
            if (res.code !== 200) return this.$message.error(res.message)
            this.loading = true
            this.option = deepClone(res.data)
        },
    },
};
</script>